/*
 * @Description: 表单校验规则
 * @Author: chenju
 * @Date: 2022-03-22 17:46:03
 * @LastEditors: qingyang
 * @LastEditTime: 2022-04-08 17:29:34
 */
export const rules = {
  factorName: [
    {
      required: true,
      message: '请输入因子名称',
      trigger: ['submit', 'change']
    }
  ],
  enName: [
    {
      required: true,
      message: '请输入英文名称',
      trigger: ['submit', 'change']
    }
  ],
  type: [
    {
      required: true,
      message: '请选择因子类型',
      trigger: ['submit', 'change']
    }
  ],
  dataUnit: [
    {
      required: true,
      message: '请选择活动数据单位',
      trigger: ['submit', 'change']
    }
  ],
  unit: [
    {
      required: true,
      message: '请选择因子排放单位',
      trigger: ['submit', 'change']
    }
  ],
  gwpVersion: [
    {
      required: true,
      message: '请选择gwp版本',
      trigger: ['submit', 'change']
    }
  ],
  // coEmission: [
  //   {
  //     required: true,
  //     message: '请输入CO₂排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // chEmission: [
  //   {
  //     required: true,
  //     message: '请输入CH₄排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // noEmission: [
  //   {
  //     required: true,
  //     message: '请输入N₂O排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // hpEmission: [
  //   {
  //     required: true,
  //     message: '请输入HFCs/PFCs排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // sfEmission: [
  //   {
  //     required: true,
  //     message: '请输入SF₆排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // nfEmission: [
  //   {
  //     required: true,
  //     message: '请输入NF₃排放',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  // hpGwp: [
  //   {
  //     required: true,
  //     message: '请输入HFCs/PFCs的gwp值',
  //     trigger: ['submit', 'change']
  //   }
  // ],
  sourceType: [
    {
      required: true,
      message: '请选择来源类型',
      trigger: ['submit', 'change']
    }
  ],
  source: [
    {
      required: true,
      message: '请输入因子来源',
      trigger: ['submit', 'change']
    }
  ],
  version: [
    {
      required: true,
      message: '请输入版本号',
      trigger: ['submit', 'change']
    }
  ]
};

export const typeOption = [
  {
    value: 'COAL',
    label: '煤'
  },
  {
    value: 'FUEL_OIL',
    label: '燃料油'
  },
  {
    value: 'FUEL_GAS',
    label: '燃料气'
  },
  {
    value: 'OUTSOURCED_ELECTRICITY',
    label: '外购电力'
  },
  {
    value: 'OUTSOURCED_HEAT',
    label: '外购热力'
  },
  {
    value: 'OTHER',
    label: '其他'
  }
];

export const dataUnitOption = [
  {
    value: 'g',
    label: 'g'
  },
  {
    value: 't',
    label: 't'
  },
  {
    value: 'kg',
    label: 'kg'
  },
  {
    value: 'L',
    label: 'L'
  },
  {
    value: 'm³',
    label: 'm³'
  },
  {
    value: 'kWh',
    label: 'kWh'
  },
  {
    value: 'MWh',
    label: 'MWh'
  },
  {
    value: 'GJ',
    label: 'GJ'
  }
];

export const unitOption = [
  {
    value: 'g/g',
    label: 'g/g'
  },
  {
    value: 't/t',
    label: 't/t'
  },
  {
    value: 'kg/kg',
    label: 'kg/kg'
  },
  {
    value: 'kg/L',
    label: 'kg/L'
  },
  {
    value: 'kg/m³',
    label: 'kg/m³'
  },
  {
    value: 'kg/kWh',
    label: 'kg/kWh'
  },
  {
    value: 't/MWh',
    label: 't/MWh'
  },
  {
    value: 't/GJ',
    label: 't/GJ'
  },

  {
    value: 'kg/t·km',
    label: 'kg/t·km'
  },
  {
    value: 'kg/person·km',
    label: 'kg/person·km'
  },
  {
    value: 'kg/km',
    label: 'kg/km'
  },
  {
    value: 'kg/mile',
    label: 'kg/mile'
  },
  {
    value: 't/vehicle',
    label: 't/vehicle'
  },
  {
    value: 'kg/unit',
    label: 'kg/unit'
  },
  {
    value: 'kg/ha',
    label: 'kg/ha'
  },
  {
    value: 'kg/head·yr',
    label: 'kg/head·yr'
  }
];
